.TH std::not_equal_to 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::not_equal_to \- std::not_equal_to

.SH Synopsis
   Defined in header <functional>
   template< class T >             \fI(until C++14)\fP
   struct not_equal_to;
   template< class T = void >      \fI(since C++14)\fP
   struct not_equal_to;

   Function object for performing comparisons. Unless specialised, invokes operator!=
   on type T.

.SH Specializations

   The standard library provides a specialization of std::not_equal_to
   when T is not specified, which leaves the parameter types and return
   type to be deduced.
                                                                          \fI(since C++14)\fP
   not_equal_to<void> function object implementing x != y deducing
   \fI(C++14)\fP            parameter and return types
                      \fI(class template specialization)\fP

.SH Member types

   Type                                                         Definition
   result_type (deprecated in C++17)(removed in C++20)          bool
   first_argument_type (deprecated in C++17)(removed in C++20)  T
   second_argument_type (deprecated in C++17)(removed in C++20) T

   These member types are obtained via publicly inheriting                \fI(until C++11)\fP
   std::binary_function<T, T, bool>.

.SH Member functions

   operator() checks if the arguments are not equal
              \fI(public member function)\fP

std::not_equal_to::operator()

   bool operator()( const T& lhs, const T& rhs ) const;            \fI(until C++14)\fP
   constexpr bool operator()( const T& lhs, const T& rhs ) const;  \fI(since C++14)\fP

   Checks whether lhs is not equal to rhs.

.SH Parameters

   lhs, rhs - values to compare

.SH Return value

   true if lhs != rhs, false otherwise.

.SH Exceptions

   May throw implementation-defined exceptions.

.SH Possible implementation

   constexpr bool operator()(const T& lhs, const T& rhs) const
   {
       return lhs != rhs;
   }

.SH See also

   equal                determines if two sets of elements are the same
                        \fI(function template)\fP
   less                 function object implementing x < y
                        \fI(class template)\fP
   ranges::not_equal_to constrained function object implementing x != y
   (C++20)              \fI(class)\fP
